import request from '@/utils/request'

// 展会基本信息
export function stand_info(data) {
  return request({
    url: '/exhibition/stand_info',
    method: 'PUT',
    data
  })
}

// 根据展会号查询
export function stand_infoid(data) {
  return request({
    url: '/exhibition/stand_info/list',
    method: 'get',
    params:{
      standNum:data
    }
  })
}
// 搭建商信息
export function organizetion_info(data) {
    return request({
      url: '/exhibition/organizetion_info',
      method: 'PUT',
      data
    })
  }
  // 搭建商信息
export function attachment(data) {
  return request({
    url: '/exhibition/attachment',
    method: 'POST',
    data
  })
}
// 获取搭建商信息
export function getOrganizetionInfo() {
  return request({
    url: '/exhibition/organizetion_info/getInfoForWeb',
    method: 'get',
  })
}
// 新增申请
export function zwapply(data) {
  return request({
    url: '/exhibition/apply',
    method: 'post',
    data
  })
}
// 修改
export function upalodapply(data) {
  return request({
    url: '/exhibition/apply',
    method: 'put',
    data
  })
}
// 修改
export function doUpply(data) {
  return request({
    url: '/exhibition/apply/doUpply',
    method: 'put',
    data
  })
}
// 历史记录
export function getlist(params) {
  return request({
    url: '/exhibition/apply/list',
    method: 'get',
    params
  })
}
// 远程搜索
export function stand_infolist(params) {
  return request({
    url: '/exhibition/stand_info/listForWeb',
    method: 'get',
    params
  })
}
// 详情数据
export function apply(id) {
  return request({
    url: '/exhibition/apply/'+id,
    method: 'get',
  })
}

// 查询报图文件
export function applydetils(cadApplyId) {
  return request({
    url: '/exhibition/attachment/list',
    method: 'get',
    params:{
      cadApplyId
    }
  })
}
//更新包图文件
export function updateAttachment(data) {
  return request({
    url: '/exhibition/attachment',
    method: 'PUT',
    data
  })
}
// 删除报图文件
export function deletefill(id) {
  return request({
    url: '/exhibition/attachment/'+id,
    method: 'delete',
  })
}

// 展位信息
export function getStandInfo(id) {
  return request({
    url: '/exhibition/stand_info/'+id,
    method: 'get',
  })
}

// 查询报图文件
export function genarateCadAttachment(cadApplyId) {
  return request({
    url: '/exhibition/attachment/genarateCadAttachment',
    method: 'get',
    params:{
      cadApplyId
    }
  })
}

export function verifyHasApply(standId) {
  return request({
    url: '/exhibition/apply/verifyHasApply',
    method: 'get',
    params:{
      standId
    }
  })
}


export function verifyHasDoBg(standId) {
  return request({
    url: '/exhibition/stand_info/verifyDoBg',
    method: 'get',
    params:{
      standId
    }
  })
}